<!--城市选择组件-->
<template>
  <div class="custom-datepicker">
    <van-picker
    v-bind="attrs"
      v-model="modelValue"
      @confirm="onConfirm"
      @cancel="onCancel"
    />
  </div>
</template>

<script setup>
import { useAttrs} from 'vue';
import { Picker as VanPicker } from 'vant';
//默认绑定modelValue
const modelValue=defineModel()
const attrs=useAttrs();
const emit = defineEmits([ 'confirm', 'cancel']);

const onConfirm = (value) => {
  emit('confirm', value);
};
const onCancel = () => {
  emit('cancel');
};
</script>
<style lang="scss" scoped>
.custom-datepicker {
  width: 100%;
}
</style>
